package com.pengcheng.taskapplication.net;
import com.pengcheng.taskapplication.model.AccountModel;
import com.pengcheng.taskapplication.model.AccountTranModel;
import com.pengcheng.taskapplication.model.AccountVerify;
import com.pengcheng.taskapplication.model.BankInfoModel;
import com.pengcheng.taskapplication.model.BankListModel;
import com.pengcheng.taskapplication.model.BannerModel;
import com.pengcheng.taskapplication.model.BaseEntity;
import com.pengcheng.taskapplication.model.BaseListEntity;
import com.pengcheng.taskapplication.model.BindCardModel;
import com.pengcheng.taskapplication.model.BindResModel;
import com.pengcheng.taskapplication.model.CarSignModel;
import com.pengcheng.taskapplication.model.CheckModel;
import com.pengcheng.taskapplication.model.CodeModel;
import com.pengcheng.taskapplication.model.CommitOrderModel;
import com.pengcheng.taskapplication.model.DeviceStatusModel;
import com.pengcheng.taskapplication.model.IcbcValidateModel;
import com.pengcheng.taskapplication.model.IcbcverifySms;
import com.pengcheng.taskapplication.model.IdcardAllOcrModel;
import com.pengcheng.taskapplication.model.IdcardBackOcrModel;
import com.pengcheng.taskapplication.model.IdcardFrontOcrModel;
import com.pengcheng.taskapplication.model.NewLoginModel;
import com.pengcheng.taskapplication.model.NoticeModel;
import com.pengcheng.taskapplication.model.OpenAccountResult;
import com.pengcheng.taskapplication.model.ParkOrderModel;
import com.pengcheng.taskapplication.model.PayStatusModel;
import com.pengcheng.taskapplication.model.PlateNoModel;
import com.pengcheng.taskapplication.model.RealNameAuthModel;
import com.pengcheng.taskapplication.model.SubscribeOrderListModel;
import com.pengcheng.taskapplication.model.SubscribeOrderModel;
import com.pengcheng.taskapplication.model.UserDetailVo;
import com.pengcheng.taskapplication.model.UserTokenModel;
import com.pengcheng.taskapplication.model.UserVo;
import com.pengcheng.taskapplication.model.VehicleId;
import com.pengcheng.taskapplication.model.WXEntity;
import com.pengcheng.taskapplication.model.WashOrderModel;
import com.pengcheng.taskapplication.model.WashTypeModel;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import rx.Observable;


/**
 * Created by kekex on 2019/2/28.
 * new api
 */
public interface ApiStoreV2 {


    /**
     * 创建订单
     */
    @FormUrlEncoded
    @POST("parking/createorder")
    Observable<BaseEntity> createOrder(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("parkid") String parkid,
            @Field("laneno") String laneno
    );

    /**
     * 订单详情接口
     */
    @FormUrlEncoded
    @POST("parking/getorderone")
    Observable<BaseEntity<ParkOrderModel>> getOrderDetail(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );



    /**
     * 订单详情接口
     */
    @FormUrlEncoded
    @POST("user/checktoken")
    Observable<BaseEntity> checkToken(
            @Field("token") String token,
            @Field("uid") String uid
    );

    /**
     * 订单详情接口
     */
    @FormUrlEncoded
    @POST("wash/getorderone")
    Observable<BaseEntity<WashOrderModel>> getWashOrderDetail(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );


    /**
     * 通知接口
     */
    @FormUrlEncoded
    @POST("wash/finishnotice")
    Observable<BaseEntity<WashOrderModel>> notice(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );

    /**
     * 通知接口
     */
    @FormUrlEncoded
    @POST("parking/finishnotice")
    Observable<BaseEntity<WashOrderModel>> noticePark(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );
    /**
     * 拉取预支付信息接口
     */
    @FormUrlEncoded
    @POST("parking/wxpay")
    Observable<BaseEntity<WXEntity>> wxpay(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );

    /**
     * 拉取预支付信息接口
     */
    @FormUrlEncoded
    @POST("wash/wxpay")
    Observable<BaseEntity<WXEntity>> wxwashpay(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );

    /**
     * 新版登录信息接口
     */
    @FormUrlEncoded
    @POST("parking/login")
    Observable<BaseEntity<NewLoginModel>> newLogin(
            @Field("uid") String uid,
            @Field("channel") int channel
    );


    /**
     * 拉取停车订单列表信息接口
     */
    @FormUrlEncoded
    @POST("parking/getorderlist")
    Observable<BaseEntity> queryParkOrderList(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("page") int page,
            @Field("pagesize") int pagesize
    );

    /**
     * 拉取洗车订单列表信息接口
     */
    @FormUrlEncoded
    @POST("wash/getorderlist")
    Observable<BaseEntity> queryWashOrderList(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("page") int page,
            @Field("pagesize") int pagesize
    );


    /**
     * 获取设备状态
     */
    @FormUrlEncoded
    @POST("wash/getstatus")
    Observable<BaseEntity<DeviceStatusModel>> getStatus(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("deviceid") String deviceid
    );

    /**
     * 开启设备
     */
    @FormUrlEncoded
    @POST("wash/startwash")
    Observable<BaseEntity> startDevice(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );

    /**
     * 关闭设备
     */
    @FormUrlEncoded
    @POST("wash/stopwash")
    Observable<BaseEntity> stopDevice(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno
    );


    /**
     * 拉取洗车类型
     */
    @GET("wash/getwashoption")
    Observable<BaseEntity<ArrayList<WashTypeModel>>> getwashoption(
            @Query("token") String token,
            @Query("uid") String uid
    );

    /**
     * 拉取轮播图
     */
    @GET("banner/getall")
    Observable<BaseEntity<ArrayList<BannerModel>>> getBanner(
    );

    /**
     * 拉取通知列表
     */
    @FormUrlEncoded
    @POST("notice/getlist")
    Observable<BaseEntity<ArrayList<NoticeModel>>> getNotice(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("page") int page,
            @Field("pagesize") int pagesize
    );

    /**
     * 拉取绑卡列表
     */
    @FormUrlEncoded
    @POST("cpcn/seleckbindingcardlist")
    Observable<BaseEntity<BankListModel>> getBankList(
            @Field("token") String token,
            @Field("uid") String uid
    );

    /**
     * 签约
     */
    @FormUrlEncoded
    @POST("user/signcarnumber")
    Observable<BaseEntity> signCarNumber(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("mvid") String mvid,
            @Field("type") String type
    );






    /**
     * 获取银行信息
     */
    @FormUrlEncoded
    @POST("cpcn/seleckbincard")
    Observable<BaseEntity<BankInfoModel>> getBankInfo(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("accountnumber") String accountnumber
    );

    /**
     * 获取银行信息
     */
    @FormUrlEncoded
    @POST("cpcn/bindingcard")
    Observable<BaseEntity> bindingCard(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("channel") String channel,
            @Field("bankcardtype") String bankcardtype,
            @Field("credentialnumber") String credentialnumber,
            @Field("bankid") String bankid,
            @Field("bankname") String bankname,
            @Field("bankaccountname") String bankaccountname,
            @Field("bankaccountnumber") String bankaccountnumber,
            @Field("bankphonenumber") String bankphonenumber
    );

    /**
     * 获取银行信息
     */
    @FormUrlEncoded
    @POST("user/setpaypwd")
    Observable<BaseEntity> setPayPassword(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("paypwd") String paypwd,
            @Field("vcode") String vcode
    );

    /**
     * 获取验证码
     */
    @FormUrlEncoded
    @POST("user/sendVcode")
    Observable<BaseEntity> sendVcode(
            @Field("token") String token,
            @Field("uid") String uid
    );


    /**
     * 开启支付密码
     */
    @FormUrlEncoded
    @POST("user/setispwd")
    Observable<BaseEntity> openAndClose(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("ispwd") String ispwd
    );


    /**
     * 获取是否设置过密码，是否开启免密支付
     */
    @FormUrlEncoded
    @POST("user/getpwdinfo")
    Observable<BaseEntity<PayStatusModel>> getPayStatus(
            @Field("token") String token,
            @Field("uid") String uid
    );


    /**
     * 获取是否设置过密码，是否开启免密支付
     */
    @FormUrlEncoded
    @POST("user/getpaywaylist")
    Observable<BaseEntity<PayStatusModel>> getPaySort(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("channel") String channel
    );


    @FormUrlEncoded
    @POST("wash/cpcnpay")
    Observable<BaseEntity> cpcnpay(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("tradno") String tradno,
            @Field("payway") String payway,
            @Field("paypwd") String paypwd

    );




    /**
     * 设置payorder
     */
    @FormUrlEncoded
    @POST("user/setpayorder")
    Observable<BaseEntity> setPayOrder(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("payorder") String payorder
    );


    /**
     * 获取银行信息
     */
    @FormUrlEncoded
    @POST("cpcn/smsverify")
    Observable<BaseEntity<BankInfoModel>> smsverify(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("smscode") String smscode,
            @Field("bindingtxsn") String bindingtxsn
    );
    /**
     * 解绑
     */
    @FormUrlEncoded
    @POST("cpcn/unbindingcard")
    Observable<BaseEntity> unbind(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("channel") String channel,
            @Field("bindingTxSN") String bindingtxsn
    );




    /**
     * 获取银行信息
     */
    @FormUrlEncoded
    @POST("user/nopwdlimit")
    Observable<BaseEntity> updateLimitMoney(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("nopwdlimit") double nopwdlimit
    );






    /**
     * 生成洗车订单信息接口
     */
    @FormUrlEncoded
    @POST("wash/createorder")
    Observable<BaseEntity<WashOrderModel>> createWashOrder(
            @Field("token") String token,
            @Field("uid") String uid,
            @Field("washid") String  washid,
            @Field("deviceid") String  deviceid,
            @Field("washtype") String  washtype
    );


    /**
     * 获取签约车牌列表
     */
    @FormUrlEncoded
    @POST("user/carnumberlist")
    Observable<BaseEntity<ArrayList<CarSignModel>>> getSignCarList(
            @Field("token") String token,
            @Field("uid")   String uid
    );

}
